public class Numbers
{
   /**
      Returns the number of digits in the binary
      representation of a number
      @param n a nonnegative number
      @return the number of binary digits needed to
      represent n
   */
   
   // TODO: supply the method
   public static int binaryDigits( int num)
   {
      if( num == 0)
      {
         return 1;
      }
      int sum = 0;
      while( num != 0)
      {
         num /= 2;
         sum ++;
      }
      return sum;
   }
   
   public static void main(String[] args)
   {
      System.out.println(Numbers.binaryDigits(800));
   }
}